<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>【E宠商城】官网，精选全球宠物用品，品质养宠，尽在E宠</title>
    <link rel="shortcut icon" type="image/x-icon" href="./images/favicon.ico">
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css/gwc.css">
    <script src="./js/jquery.js"></script>
    <script src="./js/show&hide.js"></script>
    <script src="./js/returnTop.js"></script>
    <script src="./js/gwc.js"></script>
    <script src="./js/login.js"></script>
    <script src="./js/loginString.js"></script>
    <script src="./js/layer/layer.js"></script>

    <script src="./js/jquery.cookie.js"></script>

</head>

<body>
    <!-- 头部 -->
    <div class="top clear">
        <div class="top_main main-width">
            <!-- 左边 -->
            <div class="top_lf fl">
                <ul>

                    <li>
                        <a href="./index.html">
                            <img src="./images/shouye.png" alt="">E宠首页
                        </a>
                    </li>
                    <li>
                        送至：
                    </li>
                    <!-- 城市选择 -->
                    <li class="showjs">
                        <a href="">湖南
                        </a><span class="city_xia"></span>
                        <div class="hidejs">
                            <ul>
                                <!-- 选中省份，通过点击切换省份 -->
                                <li class="city_xuanzhong bgwhite">湖南</li>
                                <!-- 选择城市，通过点击切换城市 -->
                                <li class="city_xuanze">请选择</li>
                            </ul>
                            <div class="cities">
                                <div class="huabei">
                                    <span>华北：</span>
                                    <a href="javascript:;" data-placeid="1">北京</a>
                                    <a href="javascript:;" data-placeid="2">天津</a>
                                    <a href="javascript:;" data-placeid="3">河北</a>
                                    <a href="javascript:;" data-placeid="4">山西</a>
                                    <a href="javascript:;" data-placeid="5">内蒙古</a>
                                </div>
                                <div class="huadong">
                                    <span>华东：</span>
                                    <a href="javascript:;" data-placeid="9">上海</a>
                                    <a href="javascript:;" data-placeid="10">江苏</a>
                                    <a href="javascript:;" data-placeid="11">浙江</a>
                                    <a href="javascript:;" data-placeid="12">安徽</a>
                                    <a href="javascript:;" data-placeid="13">福建</a>
                                    <a href="javascript:;" data-placeid="15">山东</a>
                                </div>
                                <div class="huanan">
                                    <span>华南：</span>
                                    <a href="javascript:;" data-placeid="20">广东</a>
                                    <a href="javascript:;" data-placeid="28">广西</a>
                                    <a href="javascript:;" data-placeid="21">海南</a>
                                </div>
                                <div class="huazhong">
                                    <span>华中：</span>
                                    <a href="javascript:;" data-placeid="14">江西</a>
                                    <a href="javascript:;" data-placeid="17">河南</a>
                                    <a href="javascript:;" data-placeid="18">湖北</a>
                                    <a href="javascript:;" data-placeid="19" class="city_current">湖南</a>
                                </div>
                                <div class="xinan"></div>
                                <div class="xibei"></div>
                                <div class="dongbei"></div>
                                <div class="qita"></div>
                            </div>
                            <div class="city_city">
                                <a href="javascript:;" data-placeid="43312" class="current">长沙市</a>
                                <a href="javascript:;" data-placeid="43675">株洲市</a>
                                <a href="javascript:;" data-placeid="44399">湘潭市</a>
                                <a href="javascript:;" data-placeid="44627">衡阳市</a>
                                <a href="javascript:;" data-placeid="45060">岳阳市</a>
                                <a href="javascript:;" data-placeid="45288">常德市</a>
                                <a href="javascript:;" data-placeid="45671">张家界市</a>
                                <a href="javascript:;" data-placeid="45944">益阳市</a>
                                <a href="javascript:;" data-placeid="46174">郴州市</a>
                                <a href="javascript:;" data-placeid="46601">永州市</a>
                                <a href="javascript:;" data-placeid="46922">怀化市</a>
                                <a href="javascript:;" data-placeid="47275">娄底市</a>
                                <a href="javascript:;" data-placeid="47376">湘西土家族苗族自治州</a>
                                <a href="javascript:;" data-placeid="47591">邵阳市</a>
                            </div>
                        </div>
                    </li>
                    <li><a href=""><img src="./images/echongzp.png" alt="">E宠就是正品</a></li>
                </ul>

            </div>
            <!-- 右边 -->
            <ul class="top_rf fr">
                <ul>
                    <li><a href="#" class="cred">问题反馈</a></li>
                    <li><a href=""> <img src="./images/shouji.png" alt="">手机版</a>
                        <span class="sjewm"><img src="./images/app-code.jpg" alt=""></span>
                    </li>
                    <!-- 收藏 -->
                    <li class="showjs">
                        <p class="shoucang"><em style="font-size: 15px;margin-right: 5px;">★</em><span>收藏</span><b></b>
                        </p>
                        <ul class="sc_hide boxsha hidejs">
                            <li><a href="">我的收藏</a></li>
                        </ul>
                    </li>
                    <!-- 我的E宠 -->
                    <li class="showjs">
                        <a href=""><img src="./images/wodeechong.png" alt=""> 我的E宠<b></b></a>
                        <ul class="hidejs boxsha">
                            <li><a href="">我的订单</a></li>
                            <li><a href="">退换货记录</a></li>
                            <li><a href="">我的优惠券</a></li>
                            <li><a href="">我的余额</a></li>
                            <li><a href="">VIP俱乐部</a></li>
                        </ul>
                    </li>
                    <li><a href="./gwc.html"><img src="./images/gouwuche.png" alt=""> 购物车(<span
                                class="cred cartsgoods_num1">0</span>)</a></li>
                    <li class="top_reg"><a href="javascript:;">[注册]</a></li>
                    <li class="top_login"><a href="javascript:;">[登录]</a></li>
                    <li class="user_quit"></li>
                </ul>
            </ul>
        </div>

    </div>

    <!-- 主体 -->
    <div class="gwc_content main-width">
        <!-- 头部 -->
        <div class="gwc_head clear">
            <div class="gwc_head_log fl">
                <a href="./index.html"><img src="./images/cart-logo.png" alt=""></a>
            </div>
            <div class="gwc_head_txt c333 fl">购物车</div>
            <form action="">
                <div class="gwc_search fr">
                    <input type="text" name="keywords" class="search_txt fl">
                    <a href="" class="search_button fr ftc">搜索</a>
                </div>
            </form>
        </div>
        <!-- 主体 -->
        <div class="gwc_list clear">
            <div class="cart-menu">
                <ul class="cart-ment-list clear">
                    <li class="gwc_one1 fl">
                        <span class="newtips1"></span>E宠购物车
                        <em>0</em>
                    </li>
                    <li class="gwc_one2 fl">
                        <span class="newtips2"></span>E宠国际购物车
                        <em></em>
                    </li>
                    <li class="gwc_one3 fl">
                        <span class="newtips3"></span>我的收藏
                        <em>?</em>
                    </li>
                    <li class="gwc_one4 fl">
                        <span class="newtips4"></span>我购买过
                        <em>?</em>
                    </li>
                    <li class="gwc_one5 fl">
                        <span class="newtips5"></span>最近浏览
                        <em>1</em>
                    </li>
                </ul>
                <div class="nav_current"></div>
            </div>
            <div class="cart-sentcity">
                <span class="fl ft14 c999">送货至：</span>
                <div class="place_div fl">
                    <!-- 地址头 -->
                    <div class="place_show c666">
                        <div class="place_str">湖南 长沙 芙蓉区</div>
                        <em></em>
                    </div>
                    <!-- 地址子盒子 -->
                    <div class="place_hide"></div>
                </div>
            </div>
            <!-- 下面goodlist -->
            <div class="contentbox">
                <div class="con_one_1 hidejs">
                    <div class="ftc">
                        <div class="shop_cart">
                            <h1 class="c999">您购物车空空的，快去选购吧！</h1>
                            <div class="go_btn">
                                <a href="./index.html">
                                    <span>一键购买</span>
                                </a>
                                <a href="./index.html">
                                    <span>去首页</span>
                                </a>
                            </div>
                        </div>
                    </div>
                    <a href=""></a>
                </div>
                <!-- 购物车里的商品信息 -->
                <div class="con_one_2">
                    <table cellpadding="0" cellspacing="0" class="cart-table mt" border="0" width="100%">
                        <tbody id="tab">
                        </tbody>
                    </table>
                    <a style="margin-bottom: 60px;display: block;" name="huangou"></a>

                    <!-- 换购商品 -->
                    <div>
                        <div class="w-max ct">
                            <div class="hg-banner">
                                <div class="mb20">
                                    <img src="./images/0126f22a5f1bae32b6acc151fef3961b.jpg" width="1200" height="100">
                                </div>
                            </div>
                            <ul class="nav_change">
                                <li class="" data-rlid="6">购满99.00</li>
                                <li class="" data-rlid="8">购满199.00</li>
                                <li class="nav_selected" data-rlid="11">购满299.00</li>
                            </ul>
                            <div class="hgGoodsBox clear">
                                <div class="fl fl-border">
                                    <div class="rela">
                                        <a class="goodsImg" href="">
                                            <img alt="多啦小萌 环境消毒剂便携装 270ml" src="./images/135805_139251.jpg">
                                        </a>
                                        <p class="hgGoodsTit ft12 pd14">
                                            多啦小萌 环境消毒剂便携装 270ml </p>
                                        <div class="hgPriceBox pd14 mt18 clear">
                                            <div class="priceLeft fl">
                                                <p class="ft16 cf03e3e">￥9.90</p>
                                                <p class="ft12 c999">E宠价: <span class="through">￥49.00</span></p>
                                            </div>
                                            <div class="cartBox fr">
                                                <a href="javascript:;">
                                                    <img src="./images/cart.png">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fl fl-border">
                                    <div class="rela">
                                        <a class="goodsImg" href="">
                                            <img alt="蒙贝 香烧牛肉条零食 500g"
                                                src="./images/287ea95321a219977e71be38d62cb288.jpg">
                                        </a>
                                        <p class="hgGoodsTit ft12 pd14">
                                            蒙贝 香烧牛肉条零食 500g </p>
                                        <div class="hgPriceBox pd14 mt18 clear">
                                            <div class="priceLeft fl">
                                                <p class="ft16 cf03e3e">￥9.90</p>
                                                <p class="ft12 c999">E宠价: <span class="through">￥23.80</span></p>
                                            </div>
                                            <div class="cartBox fr">
                                                <a href="javascript:;">
                                                    <img src="./images/cart.png">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fl fl-border">
                                    <div class="rela">
                                        <a class="goodsImg" href="">
                                            <img alt="好适嘉 薯香嫩鸡犬零食 160g" src="./images/20190906205026_91393.jpg">
                                        </a>
                                        <p class="hgGoodsTit ft12 pd14">
                                            好适嘉 薯香嫩鸡犬零食 160g </p>
                                        <div class="hgPriceBox pd14 mt18 clear">
                                            <div class="priceLeft fl">
                                                <p class="ft16 cf03e3e">￥15.90</p>
                                                <p class="ft12 c999">E宠价: <span class="through">￥29.90</span></p>
                                            </div>
                                            <div class="cartBox fr">
                                                <a href="javascript:;">
                                                    <img src="./images/cart.png">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fl fl-border">
                                    <div class="rela">
                                        <a class="goodsImg" href="">
                                            <img alt="强生宠儿 子弹头胶原蛋白钙镁片 150粒" src="./images/20190807092047_677804.jpg">
                                        </a>
                                        <p class="hgGoodsTit ft12 pd14">
                                            强生宠儿 子弹头胶原蛋白钙镁片 150粒 </p>
                                        <div class="hgPriceBox pd14 mt18 clear">
                                            <div class="priceLeft fl">
                                                <p class="ft16 cf03e3e">￥18.90</p>
                                                <p class="ft12 c999">E宠价: <span class="through">￥90.00</span></p>
                                            </div>
                                            <div class="cartBox fr">
                                                <a href="javascript:;">
                                                    <img src="./images/cart.png">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fl fl-border">
                                    <div class="rela">
                                        <a class="goodsImg" href="">
                                            <img alt="得乐 聪明系列 自洁钢丝刷 樱花粉" src="./images/142345_325691.jpg">
                                        </a>
                                        <p class="hgGoodsTit ft12 pd14">
                                            得乐 聪明系列 自洁钢丝刷 樱花粉 </p>
                                        <div class="hgPriceBox pd14 mt18 clear">
                                            <div class="priceLeft fl">
                                                <p class="ft16 cf03e3e">￥19.90</p>
                                                <p class="ft12 c999">E宠价: <span class="through">￥49.00</span></p>
                                            </div>
                                            <div class="cartBox fr">
                                                <a href="javascript:;">
                                                    <img src="./images/cart.png">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fl fl-border">
                                    <div class="rela">
                                        <a class="goodsImg" href="">
                                            <img alt="【超值限量换】海瑞特HARRIET 钙维生素D软胶囊 500mg*60/瓶"
                                                src="./images/20190520144921_105919.jpg">
                                        </a>
                                        <p class="hgGoodsTit ft12 pd14">
                                            【超值限量换】海瑞特HARRIET 钙维生素D软胶囊 500mg*60/瓶 </p>
                                        <div class="hgPriceBox pd14 mt18 clearfix">
                                            <div class="priceLeft fl">
                                                <p class="ft16 cf03e3e">￥29.90</p>
                                                <p class="ft12 c999">E宠价: <span class="through">￥99.00</span></p>
                                            </div>
                                            <div class="cartBox fr">
                                                <a href="javascript:;">
                                                    <img src="./images/cart.png">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="con_one_3"></div>
                <div class="con_one_4"></div>
            </div>

        </div>
    </div>

    <!-- 尾部 -->
    <div class="footer clear">
        <div class="foot_top clear">
            <div class="foot_top_main main-width clear">
                <ul class="clear">
                    <li class="fl"><a href="">正品保障</a></li class="fl">
                    <li class="fl"><a href="">品类丰富</a></li>
                    <li class="fl"><a href="">优质服务</a></li>
                    <li class="fl"><a href="">科学养宠</a></li>
                    <li class="fl"><a href="">E宠公益</a></li>
                    <li class="fl"><a href="">十年同心</a></li>
                </ul>
            </div>
        </div>
        <div class="foot_bottom clear">
            <!-- 打电话 -->
            <div class="info clear">
                <div class="box_info1 fl">
                    <img src="./images/dog_phone.gif" alt="" class="fl">
                    <div class="dog_phone_txt fl">
                        <h2 class="c666">售后电话：</h2>
                        <p>4008889200
                            <span>「免长途费」</span>
                        </p>
                        <p>023-68851700

                        </p>
                        <p>服务时间：09:00--18:30（周一到周日）</p>
                    </div>
                </div>
                <!-- 购物指南 -->
                <div class="box_info2 fl">
                    <h2 class="ft14 c666 bold">购物指南</h2>
                    <p class="ft14 c444 mt20"><a href="">新人优惠</a></p>
                    <p class="ft14 c444 mt5"><a href="">购物问题</a></p>
                    <p class="ft14 c444 mt5"><a href="">支付问题</a></p>
                </div>
                <div class="box_info3 fl">
                    <h2 class="ft14 c666 bold">配送方式</h2>
                    <p class="ft14 c444 mt20"><a href="">外包快递</a></p>
                </div>
                <div class="box_info4 fl">
                    <h2 class="ft14 c666 bold">售后服务</h2>
                    <p class="ft14 c444 mt20"><a href="">退换货政策</a></p>
                    <p class="ft14 c444 mt5"><a href="">退款说明</a></p>
                    <p class="ft14 c444 mt5"><a href="">售后问题</a></p>
                </div>
                <div class="box_info5 fl">
                    <p class="ftc ft12">扫描下载APP</p>
                    <p class="ftc ft12">下单更优惠</p>
                    <a href=""><img src="./images/app-code.jpg" alt="" class="mt10"></a>
                </div>
                <div class="box_info6 fl">
                    <p class="ftc ft12">扫描关注E宠</p>
                    <p class="ftc ft12">商城微信</p>
                    <a href=""><img src="./images/app-code.jpg" alt="" class="mt10"></a>
                </div>
            </div>
            <!-- 关于我们 -->
            <div class="gywm c999 clear">
                <div class="gywm_main ftc">
                    <span class="ftc c999">
                        <a href="" class="c999">关于我们</a>
                        <a href="" class="c999">
                            <img src="./images/weibo_logo.png" alt="">
                            E宠商城</a>
                        <a href="" class="c999">
                            <img src="./images/weixin_logo.png" alt="">
                            E宠商城
                        </a>
                        <a href="" class="c999">
                            <img src="./images/baidu_log.png" alt="">
                            E宠商城百家号
                        </a>
                        <a href="" class="c999">
                            <img src="./images/toutiao_logo.png" alt="">
                            E宠说
                        </a>
                        <a href="" class="c999">E宠公益</a>
                        <a href="" class="c999">联系我们</a>
                        <a href="" class="c999">公司地址</a>
                        <a href="" class="c999">应急响应</a>
                        <a href="" class="c999">仓储中心</a>
                        <a href="" class="c999">用户协议</a>
                    </span>
                </div>
            </div>
            <!-- 这里不是非法之地 -->
            <div class="police clear ftc mt20">
                <a href=""><img src="./images/12315.png" alt=""></a>
                <a href=""><img src="./images/360.png" alt=""></a>
                <a href=""><img src="./images/chengxin.png" alt=""></a>
                <a href=""><img src="./images/shiming.png" alt=""></a>
                <a href=""><img src="./images/tx.png" alt=""></a>
                <a href=""><img src="./images/jybz.png" alt=""></a>
                <a href=""><img src="./images/cqgs.png" alt=""></a>
                <a href=""><img src="./images/baiq.png" alt=""></a>
                <a href=""><img src="./images/wsls.png" alt=""></a>
                <a href=""><img src="./images/sfqy.png" alt=""></a>
                <a href=""><img src="./images/yxqy.png" alt=""></a>
                <a href=""><img src="./images/bhdw.png" alt=""></a>
                <a href=""><img src="./images/sjws.png" alt=""></a>
            </div>
            <!-- 版权 -->
            <div class="copy clear">
                <p class="ftc ft12">
                    <a href="">渝ICP备10002905号-1</a>
                    &nbsp;&nbsp;
                    <a href="">渝ICP备10002905号-3</a>
                    &nbsp;&nbsp;
                    <a href="">营业执照</a>
                    &nbsp;&nbsp;
                    <a href="">兽药经营许可证</a>
                    　增值电信业务经营许可证：渝B2-20140042 Copyright © 2007-2019 epet.com 　重庆易宠科技有限公司
                </p>
            </div>
        </div>
    </div>
    <!--  -->
    <!-- 悬浮框 -->
    <div class="xuanfu">
        <div class="rtcont">
            <ul class="xf_top">
                <!--  -->
                <!--  -->
                <!-- 个人信息 -->
                <li>
                    <div class="bagBox">
                        <!--<em>◆</em>-->
                        <p class="qingdenglu">您还没有<a href="javascript:void(0);" class="top_login cred">登录</a>~~~~~</p>


                    </div>
                    <a href="javascript:void(0);"></a>
                </li>
                <!--  -->
                <!--  -->
                <!-- 购物车 -->
                <li class="fygwc">
                    <div class="fygwc_box">
                        <!-- 底部计算的盒子 -->
                        <div class="cartbt_btn pt15">
                            <p class="fl lh32">共 <span class="cred" id="cartgd_num" selectednum="7">7</span> 件商品
                                合计：<span class="cred">￥2634.00</span></p>
                            <a class="btn btn_clear">清空</a>
                            <a href="./gwc.html" class="btn">去结算</a>
                        </div>
                    </div>
                    <a href="javascript:void(0);">
                        <span class="xf_top_gwc"></span>
                        <div class="rt-cart">购物车
                            <span class="bgwhite cartsgoods_num">0</span>
                        </div>
                    </a>
                </li>
                <!--  -->
                <!--  -->
                <!-- 在线客服 -->
                <li><a href="javascript:void(0);">
                        <span class="xf_top_kf"></span>
                        <div class="rt-cart">在线客服
                            <span class="bgwhite">0</span>
                        </div>
                    </a></li>
                <!--  -->
                <!--  -->
                <!-- 我的订单 -->
                <li class="wodedingdan">
                    <label>我的订单<em class="abs">◆</em></label>
                    <a href="javascript:void(0);"></a>
                </li>
                <li><a href="javascript:void(0);"></a>
                </li>
            </ul>
            <ul class="xf_bot">
                <li><a href="javascript:void(0);"><span></span></a></li>
                <li><a href="javascript:void(0);javascript:void(0);"><span></span></a></li>
                <li><a href="javascript:void(0);"><span></span></a></li>
                <!--  -->
                <!--  -->
                <!-- 返回头部 -->
                <li class="returnTop">
                    <label>返回顶部<em>◆</em></label>
                    <a href="javascript:void(0);"></a>
                </li>
            </ul>
        </div>
    </div>
    <!--  -->
    <!--  -->
    <!-- 登录/注册 -->
    <div class="loginBox hidejs">
        <!-- 登录大盒子背景变暗 -->
        <div class="fix-warp"></div>

        <div class="login flex flex-ac flex-pc">
            <!-- 登录界面 -->
            <div class="l_login">

                <!-- 中间内容 -->
                <div class="rela">

                    <!-- 上面文字 -->
                    <p class="ftc flex c333">
                        <span class="sjyzm it1 sjyzmdl zhdl zjdl  lr_hidejs sjyzm_btn">手机验证码登录</span>
                        <span class="sjyzm it1 cf03 xyhzc lr_hidejs">新用户注册</span>
                        <span class="liner"></span>
                        <span class="zhdldl it1 zhdl lr_hidejs sjyzmdl cf03 zjdl zhdl_btn">账户登录</span>
                        <span class="zhdldl it1 xyhzc lr_hidejs zjdl_btn">直接登录</span>
                    </p>
                    <!-- 下面功能。输入，提交，登录 -->
                    <div class="gotologin">
                        <!--  -->
                        <!-- 两个账户密码输入框 -->
                        <div class="kkkkkkkk">
                            <!-- ⭐js：点击对应按钮，获取对应登陆方式类名，然后show(),其他hide(); ⭐-->
                            <!-- zhdl sjyzmdl zjdl    xyhzc -->
                            <!-- 中间的框框 -->
                            <!-- ⭐ -->
                            <!-- 登录的时候 ⭐账户登录 -->
                            <div class="allbox dlbox dlzc zhdl lr_hidejs">
                                <!-- 账号 -->
                                <div class="settings_user flex-ac flex">
                                    <!-- 左侧图标 -->
                                    <span></span>
                                    <input type="text" class="it1 phoneNum" placeholder="请输入手机号/账号" name="utel">
                                </div>
                                <!-- 密码 -->
                                <div class="settings_pwd sjyzm_pwd flex-ac flex">
                                    <span></span>
                                    <input type="password" class="it1" placeholder="请输入密码" name="upwd">

                                    <!-- 忘记密码 -->
                                    <a href="" class="ftc">
                                        <span class="c999">忘记密码</span>
                                    </a>
                                </div>

                                <div class="settings_code sjyzm_code flex-ac flex lr_hidejs">
                                    <input type="password" class="it1 code_password" placeholder="请输入验证码">
                                    <!-- 获取验证码 -->
                                    <a href="javascript:void(0); " class="ftc">
                                        <span class="cf03">获取验证码</span>
                                    </a>
                                </div>

                            </div>
                            <!-- ⭐ -->
                            <!-- 注册的时候 ⭐手机验证码登录-->
                            <div class="allbox zcbox dlzc sjyzmdl xyhzc zjdl lr_hidejs">
                                <!-- 账号 -->
                                <div class="settings_user flex-ac flex xyhzc">
                                    <!-- 左侧图标 -->
                                    <span></span>
                                    <input type="text" class="it1 phoneNum" placeholder="请输入手机号" name="regutel">
                                </div>
                                <!--  -->
                                <!--  -->
                                <!-- 验证码 -->
                                <div class="settings_code xyhzc flex-ac flex">
                                    <input type="password" class="it1 code_password" placeholder="请输入密码" name="regupwd">
                                    <!-- 获取验证码 -->
                                    <!-- <a href="javascript:;" class="ftc">
                                        <span class="cf03">获取验证码</span>
                                    </a> -->
                                </div>
                                <!--  -->
                                <!--  -->

                            </div>
                        </div>
                        <!--  -->
                        <!-- 登录按钮 -->
                        <div class="bindusergray ftc sjyzmdl zhdl zjdl lr_hidejs login_btn">登录</div>
                        <div class="bindusergray ftc xyhzc lr_hidejs reg_btn">注册</div>
                        <!-- 下面登录方式 -->
                        <p class="flex flex-pj flex-ac login_txt zhdl sjyzmdl zjdl lr_hidejs">
                            <!-- 左侧支付宝，微信，qq登录 -->
                            <span class="zwq">
                                <a href="https://passport.epet.com/Oauth.html?type=4&amp;returnurl=https%3A%2F%2Fwww.epet.com%2F"
                                    class="zhifubao"></a>
                                <a href="https://passport.epet.com/Oauth.html?type=3&amp;returnurl=https%3A%2F%2Fwww.epet.com%2F"
                                    class="weixin"></a>
                                <a href="https://passport.epet.com/Oauth.html?type=2&amp;returnurl=https%3A%2F%2Fwww.epet.com%2F"
                                    class="QQ"></a>
                            </span>
                            <!-- 右侧遇到问题 -->
                            <span class="ft12 c999 cue">
                                <a href="javascript:;" class="kszc_btn">手机快速注册</a>
                                <span class="yudaowenti">遇到问题？</span>
                            </span>
                        </p>
                        <div class="xyhzc xyhzc_txt lr_hidejs">
                            <span class="dib fl "></span>
                            <span class="que fl ft12 c333">我同意E宠
                                <a href="http://www.epet.com/article37.html" class="cf03">《用户使用协议》</a>
                            </span>
                            <span class="yudaowenti ft12 c999 fr">遇到问题？</span>
                        </div>
                    </div>
                    <tishi class="ftc cf03 ft12 hide abs bold tishi1">请输入正确手机号码！</tishi>
                    <tishi class="ftc cf03 ft12 hide abs bold tishi2">密码6-14位！</tishi>
                </div>
            </div>
        </div>
        <div></div>
    </div>
</body>

</html>
<script>
    $(function () {
        var strUser = decodeURIComponent($.cookie("uname")).split('"')[5];
        console.log(strUser)
        if (strUser) {
            $(".con_one_1").addClass("hidejs");
            $(".con_one_2").removeClass("hidejs");
            // 
            // 顶部用户信息
            $(".top_reg").remove();
            $(".top_login").remove();
            var strTxt = `<a href="javascript:;" class="c248">欢迎用户${strUser}</a>
                <span class="c999 quit">退出</span>
            `;
            $(".user_quit").html(strTxt);
            // 
            // 
            // 悬浮窗用户信息
            var str_xuanfu = `
            <div class="overflow bagP">
                            <a href="javascript:;" class="fl hd">
                                <img src="./images/4.jpg" alt="ico">
                            </a>
                            <div class="fl bagText1">
                                <span class="c000 bold">主人${strUser}</span>
                            </div>

                        </div>

                        <div class="epet-data clear">
                            <div class="epet-img fl">
                                <a href="javascript:;"><img src="./images/255f31a872b759cca8ae513afc72fa88.jpg"></a>
                            </div>
                            <div class="epet-name fr mt">
                                <a href="https://my.epet.com/mypets.html">完善宠物资料</a>
                            </div>
                        </div>
            `;
            $(".bagBox").html(str_xuanfu);

            $(".user_quit").on("click", ".quit", function () {
                layer.confirm("皇上，不再多陪陪臣妾吗？", {
                    icon: 5,
                    btn: ["朕的江山社稷为重", "拗不过你，朕再逛逛"]
                }, function (index) {
                    $.ajax({
                        url: "./api/quit",
                        type: "get"
                    }).then(function (res) {
                        layer.msg(res.msg);
                        window.location.href = "./index.html";
                    })
                    layer.close(index);
                })
            })
        }
        else {
            console.log("enter")
            $(".con_one_2").addClass("hidejs");
            $(".con_one_1").removeClass("hidejs");
        }


    })
</script>
<script>
    $(function () {
        var strUser = decodeURIComponent($.cookie("uname")).split('"')[5];
        if (strUser) {
            $.ajax({
                url: "./api/carts",
                type: "get",
                data: {
                    uid: JSON.parse($.cookie("uname"))[0].uid
                }
            }).then(function (res) {
                console.log(res);
                var num = 0;
                res.data.forEach(el => {
                    num += Number(el.p_num);
                })
                $(".cartsgoods_num").text(num);
                $(".cartsgoods_num1").text(num);
            })
            $.ajax({
                url: "./api/carts",
                type: "get",
                data: {
                    uid: JSON.parse($.cookie("uname"))[0].uid
                }
            }).done(function (res) {
                render(res.data);
            })
        }
    })

    function render(arr) {
        var html = `<tr>
                                <td colspan="5" class="pt30 pl10 pb10">
                                    <label>
                                        <input autocomplete="off" checked="checked" type="checkbox" name="check_order_1"
                                            class="fl mt5 allcheckbox" doclick="check">
                                    </label>
                                    <span class="cfff epetfh fl ml5">E宠西部中央仓</span>
                                    <b class="fl mt5 ml rela pointer showshow">
                                        <img src="./images/help.jpg">
                                        <div class="cart-tc bgwhite">
                                            <em></em>
                                            <i></i>
                                            <p class="c333 ft12">
                                                以下商品由西部大仓发货，全国除西藏、新疆外满99元包邮（西藏、新疆满99元免首重），部分地区满58元包邮（顺丰、EMS不包邮），支持余额支付、货到付款、在线支付!
                                            </p>
                                        </div>
                                    </b>
                                    <div class="baoyou-tip ymbaoyou-tip fl ml25 mt5 c666 baoyou-tip1"><span>已包邮</span>
                                        订单已包邮</div>
                                    <div class="clear"></div>
                                </td>
                            </tr>
                            <tr class="bargain_buy">
                                <td colspan="5" class="pt10  pl10  pb15  ft12">
                                    <p><img src="./images/change_img.png"></p>
                                    <p class="pl10">已满299.00元，可享超值换购噢~</p>
                                    <p class="pl20  cf03e3e  go_change">超值换购&gt;&gt;</p>
                                </td>
                            </tr>
            <tr class="cart-order ">
                                    <td width="50" align="center">
                                        <input autocomplete="off" checked="checked" type="checkbox"
                                            name="check_goods_132903" doclick="check">
                                    </td>
                                    <td width="500" valign="middle">
                                        <div class="por-img fl overflow bgwhite ftc">
                                            <a href="http://www.epet.com/goods/132903.html" target="_blank">
                                                <img src="./images/goodsssss.jpg" width="80">
                                            </a>
                                        </div>
                                        <div class="por-intro fl ml20 mt" style="margin-top: 30px;">
                                            <a href="http://www.epet.com/goods/132903.html" target="_blank"
                                                class="c333">
                                                <em class="cred isWithBuy">(订单赠品)</em>
                                                路斯 手工坊系列 鸡肉火腿肠 200g </a>
                                        </div>
                                        <div class="clear"></div>
                                    </td>
                                    <td width="150" align="center" style="padding-top:20px;">
                                        <div class="buynum-wrap clear">
                                            <input autocomplete="off" readonly="true" type="text" class="text ftc fl"
                                                value="1" id="num" size="2" style="margin:0;border:none;">
                                        </div>
                                        <p class="c666 mtneg10">有货</p>
                                    </td>
                                    <td width="200" align="center" class="c000 bold ft14">
                                        ￥0.00 </td>
                                    <td width="200" align="center">
                                        <a href="javascript:;" onclick="Epet.Common.addFavors(132903)"
                                            class="c666">[收藏]</a>
                                        
                                    </td>
                                </tr>`;
        arr.forEach(el => {
            html += `
            
            <tr class="cart-order ">
                <td width="50" align="center">
                   <input autocomplete="off" checked="checked" type="checkbox"
                    name="check_goods_117660">
                </td>
                <td width="500" valign="middle">
                    <div class="por-img fl overflow bgwhite ftc">
                         <a href="javascript:void(0);">
                            <img src="${el.pphoto}" width="80">
                        </a>
                    </div>
                    <div class="por-intro fl ml20 mt" style="margin-top: 30px;">
                        <a href="javascript:void(0);" class="c333">${el.p_name}</a>
                    </div>
                    <div class="clear"></div>
                </td>
                <td width="150" align="center" data-cid=${el.c_id} style="padding-top:20px;">
                    <p class="c666 mtneg10">规格：${el.p_size}</p>
                    <div class="buynum-wrap clear">
                        <span act="sub" class="less1 ft18 fl ">-</span>
                        <input autocomplete="off" name="gnum_117660" type="text"
                        class="text buynum ftc fl bgwhite " value="${el.p_num}" size="2">
                        <span act="add" class="fl add1">+</span>
                    </div>
                    <p class="c666 mtneg10">有货</p>
                </td>
                <td width="200" align="center" class="c000 bold ft14">￥<txt class="xiaoji">${el.u_total} </txt>
                    <p class="c89">￥<txt class="danjia">${el.p_price}</txt>/件</p>
                </td>
                <td width="200" align="center">
                    <a href="javascript:;" class="c666">[收藏]</a>
                    <a href="javascript:;" gid="117660" class="c666 delgood" data-cid=${el.c_id} >[删除]</a>
                </td>
            </tr>`;
        });
        html += `<tr>
                                <td colspan="5" class="pt30 pb10">
                                    <div class="balance">
                                        <div class="w-max ct">
                                            <div class="fl c333 pl10">
                                                <label class="mr20">
                                                    <input autocomplete="off" checked="checked" type="checkbox"
                                                        class="all-checkbox allcheckbox" name="check_all_">全选
                                                </label>
                                                <a href="javascript:;"  class="c333 del_check">[ 关注选中商品
                                                    ]</a>
                                                <a href="javascript:;" class="c333 ml5">[ 收藏选中商品
                                                    ]</a>
                                            </div>
                                            <div class="fr cart-price">
                                                总价（不含运费）:<strong class="ft18">￥<txt class="zongjia">0.00</txt>
                                                </strong>
                                                <a href="javascript:;"
                                                    class="cfff epet_sensor_settlement go-balance ftc bold ft18 ml20 bggreen">去结算</a>
                                            </div>
                                            <div class="clear"></div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="pt20">
                                    <a href="./index.html" class="go-buy">继续购物</a>
                                </td>
                            </tr>`;
        $("#tab").html(html);
        if ($("#tab tr").length == 5) {

            $(".con_one_2").addClass("hidejs");
            $(".con_one_1").removeClass("hidejs");
        }
        var cartTotal = 0;
        $(".xiaoji").each((index, el) => {
            cartTotal += Number($(el).text());
        })
        $(".zongjia").text(cartTotal);
        // 点击加减
        $(".less1").each((index, el) => {
            $(el).on("click", function () {
                var val = $(this).next("input").val();
                if (val == 1) {
                    return;
                }
                val = val - 1;
                $(this).next("input").val(val);
                $(this).parents("td").next().find(".xiaoji").text(Number(val * $(this).parents("td").next().find(".danjia").text()).toFixed(2));
                var params = {
                    cid: $(this).parents("td").data("cid"),
                    pnum: val
                }
                $.ajax({
                    url: "./api/modify",
                    type: "post",
                    data: params
                }).then(function (res) {
                    layer.msg(res.msg);
                })
                // 总价
                var cartTotal = 0;
                $(".xiaoji").each((index, el) => {
                    if ($(el).parents("tr").find("[type='checkbox']").prop("checked")) {
                        cartTotal += Number($(el).text());
                    }
                })
                $(".zongjia").text(cartTotal);
                $(".cartsgoods_num").text(Number($(".cartsgoods_num").text()) - 1);
                $(".cartsgoods_num1").text(Number($(".cartsgoods_num1").text()) - 1);


            })
        })
        $(".add1").each((index, el) => {
            $(el).on("click", function () {
                var val = $(this).prev("input").val();
                val = Number(val) + 1;
                $(this).prev("input").val(val);
                $(this).parents("td").next().find(".xiaoji").text(Number(val * $(this).parents("td").next().find(".danjia").text()).toFixed(2));
                var params = {
                    cid: $(this).parents("td").data("cid"),
                    pnum: val
                }
                $.ajax({
                    url: "./api/modify",
                    type: "post",
                    data: params
                }).then(function (res) {
                    layer.msg(res.msg);
                })
                // 
                var cartTotal = 0;
                $(".xiaoji").each((index, el) => {
                    if ($(el).parents("tr").find("[type='checkbox']").prop("checked")) {
                        cartTotal += Number($(el).text());
                    }
                })
                $(".zongjia").text(cartTotal);
                $(".cartsgoods_num").text(Number($(".cartsgoods_num").text()) + 1);
                $(".cartsgoods_num1").text(Number($(".cartsgoods_num1").text()) + 1);
            })
        })

        // 删除
        $(".delgood").each((i, el) => {
            $(el).on("click", function () {
                var self = this;
                layer.confirm("皇上，您真的要抛弃臣妾吗~~~~~~~~~~~臣妾做不到呀QAQ", {
                    icon: 6,
                    btn: ["朕意已决，休要多言！", "容朕想想~"]
                }, function (index) {
                    $.ajax({
                        url: "./api/delete",
                        type: "post",
                        data: {
                            cid: $(self).data("cid")
                        }
                    }).then(function (res) {
                        layer.msg(res.msg);

                        $(self).parents("tr").remove();
                        var cartTotal = 0;
                        $(".xiaoji").each((index, el) => {
                            if ($(el).parents("tr").find("[type='checkbox']").prop("checked")) {
                                cartTotal += Number($(el).text());
                            }
                        })
                        $(".zongjia").text(cartTotal);
                        // 判断删除空了
                        if ($("#tab tr").length == 5) {

                            $(".con_one_2").addClass("hidejs");
                            $(".con_one_1").removeClass("hidejs");
                        }
                    })
                    layer.close(index);
                })

            })


        })



        $("#tab input.allcheckbox").on("click", function () {

            $("#tab").find("[type='checkbox']").prop('checked', $(this).prop("checked"));
            var myMoney = 0
            $("#tab").find("[type='checkbox']:checked").parents("tr").each((index, el) => {
                myMoney += Number($(el).find(".xiaoji").text())
            })
            $(".zongjia").text(myMoney);
            if ($(this).prop("checked")) {
                $(".epet_sensor_settlement").addClass("bggreen");
            } else {
                $(".epet_sensor_settlement").removeClass("bggreen");
            }
        })
        // 
        $("#tab").on("click", "[type='checkbox']:not(.allcheckbox)", function () {
            var myMoney = 0
            $(this).parents("tbody").find("[type='checkbox']:checked").each((index, el) => {
                myMoney += Number($(el).parents("tr").find(".xiaoji").text())
            })
            $(".zongjia").text(myMoney);
            //如果所有的 checkbox都选中,上面第一个就要打钩
            $("#tab input.allcheckbox").prop("checked", $("#tab [type='checkbox']:not(.allcheckbox)").length == $("#tab [type='checkbox']:not(.allcheckbox):checked").length);
            if ($("#tab [type='checkbox']:not(.allcheckbox):checked").length > 0) {
                $(".epet_sensor_settlement").addClass("bggreen");
            } else {
                $(".epet_sensor_settlement").removeClass("bggreen");
            }
        })
    }
</script>